package com.training.admin.entity.report;

import java.text.SimpleDateFormat;

import com.training.admin.entity.project.Project;

/**
 * 项目报表
 * @author Rockett
 *
 */
public class ProjectReport {
	/**
	 * 项目
	 */
	private Project project;
	/**
	 * 学员数
	 */
	private int traineeCount;
	/**
	 * 结业人数
	 */
	private int completeCount;
	/**
	 * 课程数
	 */
	private int courseCount;
	/**
	 * 学时
	 */
	private double hour;
	/**
	 * @return the project
	 */
	public Project getProject() {
		return project;
	}
	/**
	 * @param project the project to set
	 */
	public void setProject(Project project) {
		this.project = project;
	}
	/**
	 * @return the traineeCount
	 */
	public int getTraineeCount() {
		return traineeCount;
	}
	/**
	 * @param traineeCount the traineeCount to set
	 */
	public void setTraineeCount(int traineeCount) {
		this.traineeCount = traineeCount;
	}
	/**
	 * @return the completeCount
	 */
	public int getCompleteCount() {
		return completeCount;
	}
	/**
	 * @param completeCount the completeCount to set
	 */
	public void setCompleteCount(int completeCount) {
		this.completeCount = completeCount;
	}
	/**
	 * @return the courseCount
	 */
	public int getCourseCount() {
		return courseCount;
	}
	/**
	 * @param courseCount the courseCount to set
	 */
	public void setCourseCount(int courseCount) {
		this.courseCount = courseCount;
	}
	/**
	 * @return the hour
	 */
	public double getHour() {
		return hour;
	}
	
	/**
	 * @param hour the hour to set
	 */
	public void setHour(double hour) {
		this.hour = hour;
	}
	/**
	 * format begin date for export
	 * @return
	 */
	public String getFormattedProjectBeginDate(){
		try{
        	SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        	return dateFormat.format(this.project.getBeginDate());
		}catch(Exception e){
			return "";
		}
	}
	/**
	 * format end date for export
	 * @return
	 */
	public String getFormattedProjectEndDate(){
		try{
        	SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        	return dateFormat.format(this.project.getEndDate());
		}catch(Exception e){
			return "";
		}
	}
}
